<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/allApp.css" />
		<link rel="stylesheet" href="css/css.css" />
		<style type="text/css">
			.mui-left.title {
				margin: 0;
				width: 90%;
			}

			.xj-content .mui-card-content {
				padding: 2px 2px 14px 2px;
			}
			.list-itemm{
				padding: 5px 10px;
				margin-bottom: 10px;
				background-color: #ffffff;
			} 
			.list-itemm-cell1{
				display: flex;
				justify-content: space-between;
			}
			.list-itemm-cell2{
				display: flex;
				justify-content: space-between;
				margin-top: 5px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">未关闭缺陷</h1>
		</header>
		<div class="mui-content">
			<div class="xj-content" id="content">
				<div class="H-10"></div>
				<div style="font-size: 14px;" >
					<div class="list-itemm" v-for="(item,index) in data" :data-type="(item.exception_status)" :data-id="(item.id)" :key="index">
						<div class="list-itemm-cell1">
							<div >
								设备名称:{{item.name}}
							</div>
						</div>
						<div  class="list-itemm-cell2">
							<div >
								设备编号：{{item.number}}
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script type="text/javascript" src="../../js/mkeyplus.base.xunjian.js"></script>
		<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="../../js/common.js"></script>
		<script type="text/javascript" src="../../js/uuid.js"></script>
		<script type="text/javascript" src="../../js/vue.js"></script>
		<script type="text/javascript">
			mui.init()
			var org_code1 = "";
			var rate = "";

			mui.plusReady(function() {
				window.vm = new Vue({
					el: "#content",
					data: {
						data: []
					}
				});
				
				var self = plus.webview.currentWebview();
				rate = self.rate;
				console.log('rate=' + rate);
				//				var btn_state = self.btn_state;
				var org_code = localStorage.getItem('org_code'); //获取缓存中的风场编号
				org_code1 = JSON.parse(org_code);
				ajaxFunwei();

				function ajaxFunwei() {
					plus.nativeUI.showWaiting('列表加载中...');
					mui.baseApp.httpRequst('/api/v2/sbxj/findDefectXjList', {
							wind: org_code1
						},
						function(data) {
							plus.nativeUI.closeWaiting();
							if (data.status == 200) {
								console.log("请求成功");
								var data = data.data;
								vm.data = data;
								console.log("未巡检预览" + JSON.stringify(data))

							}
						});
				}
				clickToqxd();
			})
			
			function clickToqxd() {
				$('.mui-content').on('tap', '.list-itemm', function() {
					var Type = $(this).attr('data-type');
					var id = $(this).attr('data-id');
					console.log(Type+'.......'+id);
					mui.openWindow({
						url: 'yulan.html',
						id: 'yulan.html',
						extras: {
							_id: id,
							Type: Type
						},
						createNew: false
					})
				});
			
			}
		</script>
	</body>

</html>
